namespace SharpGraphT.Graph.Specifics; 

public interface ISpecifics<TV, TE> {
    bool AddVertex(TV v);
    bool RemoveVertex(TV v);
    IReadOnlySet<TV> VertexSet { get; }
    IReadOnlySet<TE> GetAllEdges(TV sourceVertex, TV targetVertex);
    TE GetEdge(TV sourceVertex, TV targetVertex);
    bool AddEdgeToTouchingVertices(TV sourceVertex, TV targetVertex, TE e);

    bool AddEdgeToTouchingVerticesIfAbsent(TV sourceVertex, TV targetVertex,
        TE e);

    TE CreateEdgeToTouchingVerticesIfAbsent(TV sourceVertex, TV targetVertex,
        Func<TE> edgeSupplier);

    int DegreeOf(TV vertex);
    IReadOnlySet<TE> EdgesOf(TV vertex);
    int InDegreeOf(TV vertex);
    IReadOnlySet<TE> IncomingEdgesOf(TV vertex);
    int OutDegreeOf(TV vertex);
    IReadOnlySet<TE> OutgoingEdgesOf(TV vertex);

    void RemoveEdgeFromTouchingVertices(TV sourceVertex, TV targetVertex,
        TE e);
}